package wykop.analyze;

import wykop.page.WykopComment;

public class NumberOfReferences extends NumericCommentFeature {

	@Override
	public String name() {
		return "NoReferences";
	}

	@Override
	public int value(final WykopComment comment) {

		int found = 0;
		for (final String token : WordBreaker.tokens(comment.getText())) {
			if (token.startsWith("@")) {
				found++;
			}
		}

		return found;
	}

}
